<?php

class ConversationTb extends \Phalcon\Mvc\Model
{

    /**
     *
     * @var integer
     */
    public $id;

    /**
     *
     * @var integer
     */
    public $user_id_1;

    /**
     *
     * @var integer
     */
    public $user_id_2;

    /**
     *
     * @var string
     */
    public $messages;

    /**
     *
     * @var string
     */
    public $date_created;

    public function beforeValidationOnCreate(){
        $this->date_created = CURR_DATE;
    }

    /**
     * Independent Column Mapping.
     */
    public function columnMap()
    {
        return array(
            'id' => 'id', 
            'user_id_1' => 'user_id_1', 
            'user_id_2' => 'user_id_2', 
            'messages' => 'messages', 
            'date_created' => 'date_created'
        );
    }

}
